901e47150894da65268dc6fac9da1b96667f243a
[openwrt/openwrt.git] /
1 From 0ffa1ba81b35ba147c9df6206a61499a156b0128 Mon Sep 17 00:00:00 2001
2 From: Bitterblue Smith <rtl8821cerfe2@gmail.com>
3 Date: Fri, 2 May 2025 14:49:01 +0300
4 Subject: [PATCH] wifi: rtw88: Fix RX aggregation settings for RTL8723DS
5
6 Use the same RX aggregation size and timeout used by the out-of-tree
7 RTL8723DS driver. Also set mystery bit 31 of REG_RXDMA_AGG_PG_TH. This
8 improves the RX speed from ~44 Mbps to ~67 Mbps.
9
10 Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
11 Acked-by: Ping-Ke Shih <pkshih@realtek.com>
12 Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
13 Link: https://patch.msgid.link/4c79fdc1-54bc-4986-9931-bb3ceb418b97@gmail.com
14 ---
15 drivers/net/wireless/realtek/rtw88/sdio.c | 14 ++++++++++++--
16 1 file changed, 12 insertions(+), 2 deletions(-)
17
18 --- a/drivers/net/wireless/realtek/rtw88/sdio.c
19 +++ b/drivers/net/wireless/realtek/rtw88/sdio.c
20 @@ -677,12 +677,22 @@ static void rtw_sdio_enable_rx_aggregati
21 {
22 u8 size, timeout;
23
24 - if (rtw_chip_wcpu_11n(rtwdev)) {
25 + switch (rtwdev->chip->id) {
26 + case RTW_CHIP_TYPE_8703B:
27 + case RTW_CHIP_TYPE_8821A:
28 + case RTW_CHIP_TYPE_8812A:
29 size = 0x6;
30 timeout = 0x6;
31 - } else {
32 + break;
33 + case RTW_CHIP_TYPE_8723D:
34 + size = 0xa;
35 + timeout = 0x3;
36 + rtw_write8_set(rtwdev, REG_RXDMA_AGG_PG_TH + 3, BIT(7));
37 + break;
38 + default:
39 size = 0xff;
40 timeout = 0x1;
41 + break;
42 }
43
44 /* Make the firmware honor the size limit configured below */